﻿@using SCMS.Resource
@{
    ViewBag.Title = Resources.Role_Index_SCMSRoles + " - " + Resources.Global_String_SupplyChainManagementSystem;
    Layout = "~/Views/Shared/_GeneralLayout.cshtml";
}

<div id="rfpMain" class="contentMain">
<div class="contentHeader">
    <div class="headerText">
        <h3 class="title-left">@Resources.Role_Index_SCMSRoles</h3>
    </div>
    <div style="font-size: 13px; text-align: left;">
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td class="arrowLink">
                    @Ajax.ActionLink(Resources.Global_String_AddNew, "Create", (RouteValueDictionary)null, new AjaxOptions
               {
                   OnBegin = string.Format("ShowDialogue('{0}')", Resources.Role_Index_NewSCMSRole),
                   UpdateTargetId = "popup-page",
                   LoadingElementId = "popup-loading",
                   Url = Url.Action("Create")
               })
                </td>
            </tr>
            <tr>
                <td class="arrowLink">
                    @Ajax.ActionLink(Resources.Role_Index_RoleList, "List", (RouteValueDictionary)null, new AjaxOptions
               {
                   UpdateTargetId = "AdminRolesDiv",
                   LoadingElementId = "loading",
                   Url = Url.Action("List"),
                   OnSuccess = "initSorter();sorter.size(10);"
               })
                </td>
            </tr>
        </table>
    </div>
</div>
<br />
    <div id="loading" style="display: none; color: Blue; font-weight: bold;">
        <img src="@Url.Content("~/Content/images/loading_indicator.gif")" alt="@Resources.Global_String_Processing" />
    </div>
    <div id="AdminRolesDiv">
        <!-- Content goes here-->
        @Html.Action("List")
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        initSorter();
        sorter.size(50);
    });
</script>
